/**
 * Copyright ©2012-2018 HopeHaiyang Corporation, All Rights Reserved
 * http://www.wuhanhope.com
 */
package hujia.profile.web;

import hujia.profile.domain.Role;
import hujia.profile.server.header.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * class info
 *
 * @author hujia
 *         Create at 2018/7/31 10:15
 */
@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private RoleService service;

    @RequestMapping(method = RequestMethod.POST)
    public Role add(@RequestBody Role role) {
        return service.add(role);
    }
}
